package com.app.micaihu.bean.comment;

import com.app.micaihu.bean.ad.NativeAd;

import java.util.List;

/**
 * 评论列表
 * Created by linkai on 2016/11/14.
 */
public class CommentList {

    private List<NewsComment> hotCmtList;//热门评论
    private List<NewsComment> normalCmtList;//最新评论
    private List<NativeAd> commentAdInfo;//评论

    public List<NewsComment> getHotCmtList() {
        return hotCmtList;
    }

    public void setHotCmtList(List<NewsComment> hotCmtList) {
        this.hotCmtList = hotCmtList;
    }

    public List<NewsComment> getNormalCmtList() {
        return normalCmtList;
    }

    public void setNormalCmtList(List<NewsComment> normalCmtList) {
        this.normalCmtList = normalCmtList;
    }

    public List<NativeAd> getCommentAdInfo() {
        return commentAdInfo;
    }

    public void setCommentAdInfo(List<NativeAd> commentAdInfo) {
        this.commentAdInfo = commentAdInfo;
    }

    /**
     * 得到所有评论
     *
     * @return
     */
    public List<NewsComment> getAllCommentList() {
        if (hotCmtList != null && hotCmtList.size() > 0) {
            //在第一个位置添加热门评论
            NewsComment comment = new NewsComment();
            comment.setCommentTypeName("精彩评论");
            hotCmtList.add(0, comment);
        }
        if (normalCmtList != null && normalCmtList.size() > 0) {
            //在第一个位置添加最新评论
            NewsComment comment = new NewsComment();
            comment.setCommentTypeName("最新评论");
            normalCmtList.add(0, comment);
        }
        //拼接两组评论
        if (hotCmtList != null) {
            hotCmtList.addAll(normalCmtList);
        }
        return hotCmtList;
    }
}
